﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using onions_arch_service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace onions_arch_adapters.Controllers
{
    [ApiController]
    [Route("api/order")]
    public class OrderController : ControllerBase
    {
        private readonly ILogger<OrderController> _logger;
        private readonly IOrderService _orderService;
        public OrderController(ILogger<OrderController> logger,
            IOrderService orderService)
        {
            _logger = logger;
            _orderService = orderService;
        }

        [HttpPost]
        public async Task AddAsync()
        {
            await _orderService.AddOrderAsync();
        }
    }
}
